home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 1.3 KB | 45 lines | [TEXT/ttxt] |
- <<<
- -- Filename:
- -- loadme.sx
-
- -- Other Files Required:
- -- mywin.sx
-
- -- Purpose:
- -- Test that prints a Window by printing its contents directly
- -- After the Window comes up, choose Print... from the file menu to print
-
- -- Load in the printing module
- if (not isdefined Printer) do (process (new loader) "loadable/printing")
-
- fileIn theScriptDir name:"mywin.sx"
-
- global theStream := getStream theScriptDir "fishrt07.bmp" @readable
- global bm := importMedia theImportExportEngine theStream @image @dib @bitmap
- global bmShape := new twoDShape target:bm fill:blackBrush stroke:undefined
- bmShape.x := 0
- bmShape.y := 0
- plug theStream
-
- theStream := getStream theScriptDir "k5.rtf" @readable
- global theText := importmedia theImportExportEngine theStream @text @rtf @richtext
- global theBox := new textpresenter boundary:(new Rect x2:350 y2:200) target:theText
- theBox.x := 300
- theBox.y := 50
-
- global theOval := new Oval x2:120 y2:120
- global ovalShape := new twoDshape target:theOval stroke:blackbrush
- ovalShape.x := 300
- ovalShape.y := 300
-
- enableitem thetitlecontainer.systemmenubar @print
-
- global w := new MyWindowClass boundary:(new rect x1:0 y1:40 x2:640 y2:480)
- append w bmShape
- append w theBox
- append w ovalShape
-
- show w
-
- -- Choose Print... from the file menu to run the test
- >>>